package com.tac.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class Strategy {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("创建时间")
    private Date createTime;

    /**
     * 用户id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("用户id")
    private Long userId;

    /**
     * 标题
     */
    @NotNull(message = "请输入标题")
    @ApiModelProperty(value = "标题",required = true)
    private String title;

    /**
     * 内容
     */
    @NotNull(message = "请输入内容")
    @ApiModelProperty(value = "内容",required = true)
    private String content;

    /**
     * 图片
     */
    @ApiModelProperty("图片")
    private String img;


    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private Integer collection;
    @TableField(exist = false)
    private Integer comment;
    @TableField(exist = false)
    private Integer fabulous;

}